package me.wangcai.onlinechat.config;

import me.wangcai.onlinechat.controller.UploadImage;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


@SpringBootConfiguration
public class ImageConfigurer implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/uploadimages/**").addResourceLocations("file:" + UploadImage.PATH);
    }
}
